package com.aya.provider;

import com.aya.service.DemoModel;
import com.aya.service.DemoService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

/**
 * @description:
 * @date: Created in 17:59 2018/10/8
 */
@Service
public class DemoBServiceImpl implements DemoService {

    //    @GET
//    @Path("{id : \\d+}")
//    @Produces({PageAttributes.MediaType.APPLICATION_JSON})
    Logger logger = LoggerFactory.getLogger(DemoBServiceImpl.class);

    @Override
    public String sayHello(String demoModel) {
        logger.info(demoModel + " demob say hello!");
        try {
            Thread.sleep(2000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
//        return "version B hello";
        throw new RuntimeException("haha");
    }

    @Override
    public String throwExp(DemoModel name) {
        throw new RuntimeException("");
    }


    @Override
    public void sayStr(String name) {
        throw new RuntimeException("haha");
//        System.out.println(name+ " say str! B");
    }


}
